package Server;

import Factorial.Factorial;

import java.util.Scanner;
//main函数
public class Main {
    public static void main(String[] args) {

        System.out.println("请输入求阶乘的数n");
        Scanner s = new Scanner(System.in);
        int sc = s.nextInt();
        int recursion = new RecursionImpl().fact(sc);
        int group = new GroupImpl().fact(sc);
        int circulate = new CirculateImpl().fact(sc);
        System.out.println("递归求阶乘的结果为"+recursion);
        System.out.println("数组求阶乘的结果为"+group);
        System.out.println("循环求阶乘的结果为"+circulate);



    }
}
